home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / XMSLIB.ARJ / XMSLIB.H < prev    next >
Text File  |  1991-06-04  |  3KB  |  124 lines

  1. /***************************************************************************
  2. *   XMSLIB.H                                                               *
  3. *   HEADER FOR XMSLIB                                                      *
  4. *   OS:        DOS                                                         *
  5. *   VERSION:   1.21                                                        *
  6. *   DATE:      06/04/91                                                    *
  7. *                                                                          *
  8. *   Copyright (c) 1991 James W. Birdsall. All Rights Reserved.             *
  9. *                                                                          *
  10. ***************************************************************************/
  11.  
  12. #define XMSLIB_H
  13.  
  14. /*
  15. ** system includes <>
  16. */
  17.  
  18. /*
  19. ** custom includes ""
  20. */
  21.  
  22. /*
  23. ** local #defines
  24. */
  25.  
  26. /* error returns */
  27.  
  28. #define XMMOOPS     -1
  29. #define NOXMM       -2
  30.  
  31.  
  32. /* XMS library errors */
  33.  
  34. #define XMM_TOOSHORT        0x40
  35.  
  36.  
  37. /* XMS driver errors */
  38.  
  39. #define XMM_UNIMP           0x80
  40. #define XMM_VDISK           0x81
  41. #define XMM_A20ERROR        0x82
  42. #define XMM_GENERROR        0x8E
  43. #define XMM_UNRECERROR      0x8F
  44.  
  45. #define XMM_NOHMA           0x90
  46. #define XMM_HMAUSED         0x91
  47. #define XMM_HMATOOBIG       0x92
  48. #define XMM_HMANOALLOC      0x93
  49. #define XMM_A20STILLEN      0x94
  50.  
  51. #define XMM_NOFREEX         0xA0
  52. #define XMM_NOFREEXHAN      0xA1
  53. #define XMM_BADXHAN         0xA2
  54. #define XMM_BADSRCHAN       0xA3
  55. #define XMM_BADSRCOFF       0xA4
  56. #define XMM_BADDESTHAN      0xA5
  57. #define XMM_BADDESTOFF      0xA6
  58. #define XMM_BADLENGTH       0xA7
  59. #define XMM_COPYOVERLAP     0xA8
  60. #define XMM_PARITY          0xA9
  61. #define XMM_NOLOCK          0xAA
  62. #define XMM_LOCKED          0xAB
  63. #define XMM_TOOMANYLOCKS    0xAC
  64. #define XMM_LOCKFAIL        0xAD
  65.  
  66. #define XMM_UMBSMALLER      0xB0
  67. #define XMM_NOFREEUMB       0xB1
  68. #define XMM_BADUMBHAN       0xB2
  69.  
  70.  
  71. /* function macros */
  72.  
  73. #define XMMcopyto(clen,src,dhan,doff)    _XMMcopy((clen),0, \
  74.                                             (unsigned long)(src),(dhan),(doff))
  75. #define XMMcopyfrom(clen,shan,soff,dest) _XMMcopy((clen),(shan),(soff),0, \
  76.                                                          (unsigned long)(dest))
  77.  
  78.  
  79. /*
  80. ** misc: copyright strings, version macros, etc.
  81. */
  82.  
  83. /*
  84. ** typedefs
  85. */
  86.  
  87. struct XMMregs {
  88.     unsigned int regAX;
  89.     unsigned int regBX;
  90.     unsigned int regDX;
  91.     unsigned int regSI;
  92.     unsigned int regDS;
  93. };
  94.  
  95.  
  96. /*
  97. ** global variables
  98. */
  99.  
  100. extern unsigned char _XMMerror;         /* EMS error variable */
  101. extern unsigned int  _XMMversion;       /* EMS version, BCD */
  102.  
  103. extern char xmslib_vers_vers[];
  104. extern char xmslib_vers_date[];
  105. extern char xmslib_vers_time[];
  106.  
  107.  
  108. /*
  109. ** function prototypes
  110. */
  111.  
  112. extern int XMMlibinit(void);
  113. extern int XMMgetversion(void);
  114.  
  115. extern unsigned long XMMcoreleft(void);
  116. extern unsigned long XMMallcoreleft(void);
  117.  
  118. extern int XMMalloc(unsigned long bytes);
  119. extern int XMMfree(int handle);
  120.  
  121. extern int _XMMcopy(unsigned long clen, int shan, unsigned long soff,
  122.                                                  int dhan, unsigned long doff);
  123.  
  124. extern int XMMrawcall(struct XMMregs *regs);